2.6. Managing Database Copies
You can use a number of
cmdlets to manage database copies. Understanding the function of each
is essential to being able to manage database copies. The following
cmdlets are available:
Add-MailboxDatabaseCopy This cmdlet is used to create a passive copy of an existing mailbox database on another DAG member.
Remove-MailboxDatabaseCopy This cmdlet is used to delete a passive copy of an existing mailbox database.
Update-MailboxDatabaseCopy
This cmdlet updates or seeds a passive database copy. This is useful in
situations in which seeding was not performed when the copy was
created, or an error has caused the passive copy to be diverged from
the active copy.
Suspend-MailboxDatabasaeCopy This cmdlet suspends continuous replication to the specified database copy.
Resume-MailboxDatabaseCopy This cmdlet resumes continuous replication to the specified database copy that was previously suspended.
Set-MailboxDatabaseCopy This cmdlet is used to configure the activation preference, replay lag time, and truncation lag time.
Get-MailboxDatabaseCopy
This cmdlet is used to retrieve information about the mailbox copy,
such as the activation preference, replay lag time, and truncation lag
time.
Get-MailboxDatabaseCopyStatus This cmdlet is used to retrieve information about the health of the mailbox database copy.
Obtaining detailed information about the status of the database copies is important. One way to do this is with the Get-MailboxDatabaseCopyStatus cmdlet. Figure 9 shows the output of Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus | Format-List.
The two properties that are of immediate interest are the Context Index
State and the Status, which ideally are Healthy. Also, be sure to note
the CopyQueueLength
because this is the number of transaction log files that have not been
successfully copied to the passive copies. By adding the –ConnectionStatus
parameter, additional details about the replication networks is shown,
such as listing the networks being used for log replication and seeding.
Other potential states for database copies exist in addition to Healthy. Table 1 summarizes all of the possible copy status states that you may encounter.
Table 1. Database Copy Status
COPY STATUS | DESCRIPTION |
---|
ActivationSuspended | The database copy has been manually blocked from activation. |
DisconnectedAndHealthy | The
database copy has become disconnected from the active database copy.
When it was disconnected it was in the Healthy state. This status may
be reported during DAG network failures between the source copy and the
target database copy. |
DisconnectedAndResynchronizing | The database
copy is disconnected from the active database copy. When it was
disconnected it was in the Resynchronizing state. This status may be
reported during DAG network failures between the source copy and the
target database copy. |
Dismounted | The active copy is offline and not accepting client connections. |
Dismounting | The active copy is going offline and terminating client connections. |
Failed | The
database copy is in a Failed state and it isn't able to copy or replay
log files. In this state, the system will periodically check whether
the problem that caused the copy status to change to Failed has been
resolved and attempt to automatically resume. |
FailedAndSuspended | The
Failed and Suspended states have been set simultaneously by the system
because a failure was detected, and resolution of the failure
explicitly requires administrator intervention. |
Healthy | The database copy is successfully copying and replaying log files. |
Initializing | The
system is verifying that the database and log stream are in a
consistent state. This state occurs when a database copy is created;
when the Microsoft Exchange Replication service is starting; and during
transitions from Suspended, ServiceDown, Failed, Seeding, or SinglePageRestore to another state. |
Mounted | The active copy is online and accepting client connections. |
Mounting | The active copy is coming online and not yet accepting client connections. |
Resynchronizing | The database copy and its log files are being compared with the active database copy to check for divergence. |
Seeding | The
database copy is being seeded, the content index for the mailbox
database copy is being seeded, or both are being seeded. After seeding
is successful, the copy status changes to Initializing. |
SeedingSource | The database copy is being used as a source for a database copy seeding operation. |
ServiceDown | The Microsoft Exchange Replication service is not running on the server that hosts the mailbox database copy. |
SinglePageRestore | This state indicates that a single page restore operation is occurring on the database copy. |
Suspended | The database copy is in a Suspended state as a result of an administrator manually suspending the database copy by running the Suspend-MailboxDatabaseCopy cmdlet. |
In some instances, such as
during maintenance, you many need to suspend and resume continuous
replication activity for a database copy. The transaction logs do not
truncate the active mailbox database copy when one or more passive
copies are suspended. During an extended maintenance period this may
result in a large number of transaction logs accumulating in your
transaction log directory. In these cases, you may opt to remove the
affected passive database copy instead of suspending it. When the
maintenance is complete, you can re-add the passive database copy.